package monster.flight.admin.action.xtgl.role;

import monster.comm.action.BaseJsonAction;
import monster.comm.log.ILog;
import monster.comm.log.LogService;
import monster.comm.util.ReturnConstant;
import monster.flight.admin.manager.service.xtgl.RoleService;
import monster.flight.comm.entity.vo.Xt_role;

/**
 * 
 * 创建信息
 * ============= 类名: monster.flight.admin.action.xtgl.role.RoleInitAction
 * 类作用描述: * 后台系统管理角色管理修改角色初始化角色信息
 * 创建人：fyr 
 * 创建时间： 2013-1-18 上午11:26:10 
 * 修改信息1=============
 * 修改类型: //1.修改bug 2.业务变化修改 修改描述: 修改人： 修改时间：
 */
public class RoleInitAction extends BaseJsonAction {

	/**
	 * 
	 */
	private static final long serialVersionUID = -636681519809823339L;
	private static ILog log = LogService.getLog(RoleInitAction.class);
	
	private RoleService roleService;
	private Xt_role role ;
	/**
	 * 初始化修改界面
	 * @return
	 */
	public String initEdit(){
    	String isLogin = isLogin();
		if("1".equals(isLogin)){
			try {
				role = roleService.getRoleByID(role.getRole_code());     //从这里开始做
				returnVO.returnCode = ReturnConstant.IS_DEAL_OK;
			} catch (Exception e) {
				returnVO.returnCode = ReturnConstant.IS_ERR;
				returnVO.returnDesc = e.getMessage();
				log.error(e.getMessage(),e);
			}
		}else{
			returnVO.returnCode = ReturnConstant.IS_NOT_LOGIN;
		}
    	return SUCCESS;
    }
	public Xt_role getRole() {
		return role;
	}
	public void setRole(Xt_role role) {
		this.role = role;
	}
	public void setRoleService(RoleService roleService) {
		this.roleService = roleService;
	}
	
	
}
